package com.gitee.luosl.cola.lang.function.checked;

import java.util.function.BiPredicate;

public interface CheckedBiPredicate<T1, T2> {

    boolean test(T1 t1, T2 t2) throws Throwable;

    default BiPredicate<T1, T2> toBiPredicate(){
        return (t1, t2) -> {
            try {
                return test(t1, t2);
            } catch (Throwable throwable) {
                throw  new CheckedException(throwable);
            }
        };
    }
}
